<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<title>按钮脚本代码示例</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc.">
    <meta name="author" content="Coderthemes">
	
	<!-- jQuery  -->
    <script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>
	
	<!-- layui  -->
	<link rel="stylesheet" href="/static/plugins/layui/2.7.6/css/layui.css" media="all" />
	<script src="/static/plugins/layui/2.7.6/layui.js" charset="utf-8"></script>
</head>
<body>
	<div class="layui-form-item">
		<div class="layui-inline layui-col-xs12 margin_r0">
			<div class="layui-input-block">
				<pre class="layui-code" lay-options="{title:'按钮脚本，case内部须以{}包裹，结束时需要加上break;', height: '800px', ln: false, skin: 'dark', encode: false}">
								case 'event-to-add':
								{
									layer.confirm("确定刷新吗？",{
										btn: ['确定', '取消']
									}, function (index) {
										location.reload();
										layer.close(index);
									});
									break;
								}
				</pre>
				<div id="custom1"></div>
			</div>
		</div>
	</div>
	<script>
	$(function () {
		layui.use(['code'], function(){
			layui.code();
		});
	});
	</script>

</body>
</html>
